package com.sds.ai.impl.provider;

import com.google.inject.Inject;
import com.sds.ai.api.provider.DataProvider;
import com.sds.ai.api.provider.ResponseProvider;

import javax.inject.Singleton;
import java.util.List;
import java.util.Map;

@Singleton
public class ResponseProviderImpl implements ResponseProvider {

    private final DataProvider dataProvider;

    @Inject
    public ResponseProviderImpl(DataProvider dataProvider) {
        this.dataProvider = dataProvider;
    }

    @Override
    public String getResponse(String input, Map<String, String> memory) {
        if (this.dataProvider == null) {
            return "Sorry, I'm sick.\nI cannot chat right now.";
        } else {
            return "";
        }
    }
}
